/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.util.EventObject;

/**
 *
 * @author elach_000
 */
public class BeingActionEvent extends EventObject {

    private String actionType;
    private Location targetPosition;
    private Location beingPosition;
    private Activity beingActivity;
    private AnimalType animalType;
    private boolean removeTarget;

    public BeingActionEvent(Object source) {
        super(source);
        this.actionType = "";
    }

    //For move
    public void init(String actionType, Location oldPosition, Location newPosition) {
        this.actionType = actionType;
        this.targetPosition = oldPosition;
        this.beingPosition = newPosition;
    }

    //For kill & get ressource or get ressource only
    public void init(String actionType, Location oldPosition, Location newPosition, Activity activity) {
        this.actionType = actionType;
        this.targetPosition = oldPosition;
        this.beingPosition = newPosition;
        this.beingActivity = activity;
    }
    
    public void init(String actionType, Location oldPosition, Location newPosition, Activity activity,AnimalType animal) {
        this.actionType = actionType;
        this.targetPosition = oldPosition;
        this.beingPosition = newPosition;
        this.beingActivity = activity;
        this.animalType = animal;
    }

    //For Lions Kill only
    public void init(String actionType, Location oldPosition, Location newPosition, AnimalType animalType) {
        this.actionType = actionType;
        this.targetPosition = oldPosition;
        this.beingPosition = newPosition;
        this.animalType = animalType;
    }

    //for drop resource only
    public void init(String actionType, Location newPosition, Activity activity) {
        this.actionType = actionType;
        this.beingPosition = newPosition;
        this.beingActivity = activity;
    }

    public String getActionType() {
        return actionType;
    }

    public Location getTargetPosition() {
        return targetPosition;
    }

    public Location getBeingPosition() {
        return beingPosition;
    }

    public Activity getBeingActivity() {
        return beingActivity;
    }

    public boolean isRemoveTarget() {
        return removeTarget;
    }

    public void setRemoveTarget(boolean removeTarget) {
        this.removeTarget = removeTarget;
    }

    public AnimalType getAnimalType() {
        return animalType;
    }
    
    
}